﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Tuxedo.Compile
{
	internal class MemberAttribute
	{
		public Expression Expression { get; private set; }

		public MemberAttribute(Expression expression)
		{
			this.Expression = expression;
		}

		public static MemberAttribute Parse(TokenStream tokens)
		{
			tokens.PopExpected("[");
			Expression expression = Expression.ParseExpression(tokens, false);
			tokens.PopExpected("]");
			return new MemberAttribute(expression);
		}
	}
}
